package com.yuntai.pms.model.enums;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: maoze@hsyuntai.com
 * Date: 2019-03-27
 * Time: 9:26
 */
public enum AppStatus {

    APPLY("apply", "待审核"), //申请初始状态
    AUDIT_SUCCESS("audit_success", "审核通过"), //审核通过
    AUDIT_FAIL("audit_fail", "审核失败"),
    PUBLISH_SUCCESS("publish_success", "上架"), //发布上线"
    PUBLISH_FAIL("publish_fail", "下架"); //发布下架"

    private String code;
    private String name;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    AppStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }

    private final  static Map<String,String> AppStatusMap = new LinkedHashMap<String,String>();


    static {
        AppStatusMap.put(AppStatus.APPLY.getCode(),AppStatus.APPLY.getName());
        AppStatusMap.put(AppStatus.AUDIT_SUCCESS.getCode(),AppStatus.AUDIT_SUCCESS.getName());
        AppStatusMap.put(AppStatus.AUDIT_FAIL.getCode(),AppStatus.AUDIT_FAIL.getName());
        AppStatusMap.put(AppStatus.PUBLISH_SUCCESS.getCode(),AppStatus.PUBLISH_SUCCESS.getName());
        AppStatusMap.put(AppStatus.PUBLISH_FAIL.getCode(),AppStatus.PUBLISH_FAIL.getName());
    }

    public static Map<String, String> getAppStatusMap() { return AppStatusMap;
    }
}
